package com.glory.cqaospda.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.glory.cqaospda.R;
import com.glory.cqaospda.bean.TestMachineBean;

import java.util.ArrayList;
import java.util.List;

import androidx.annotation.Nullable;

public class TestMachineAdapter extends BaseQuickAdapter<TestMachineBean, BaseViewHolder> {
    public TestMachineAdapter(@Nullable ArrayList<TestMachineBean> data) {
        super(R.layout.adapter_lot, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, TestMachineBean s) {
        helper.setGone(R.id.tvPosition,true);
        helper.setText(R.id.tvLotID,s.getTesterType());
        helper.getView(R.id.ivDelete).setOnClickListener(view -> {
            remove(helper.getAdapterPosition());
            notifyDataSetChanged();
        });
    }
}
